<template>
  <div style='height: 100%'>
    <planData :createbtnShow="createbtnShow" fromPage="creater" parentCode="SHARE_HOW_DO_PLAN_TABLE_CODE" :uploadUrl="url('itShare', '/wfRptPlantask/excelImport/one')"></planData>
  </div>
</template>

<script>
import planData from '../../dataSummary/planData.vue'
import todoApi from '@api/todoCender'
export default {
  name: 'implementationPlan',
  components: {
    planData
  },
  props: {
    '$route': {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      createbtnShow: true
    }
  },
  created() {
    this.init()
  },
  methods: {
    init() {
      this.toRead()
    },
    toRead() {
      if (!this.$route || !this.$route.query) return
      const { Bid, Ldap, code } = this.$route.query
      if (Bid && Ldap && code) {
        todoApi.toRead({ Bid, Ldap, taskCode: code }).then(()=> {
        }).catch(err => {
          throw new Error(err)
        })
      }
    },
    url(type, pathname) {
      return window.RPConfig[type] + pathname;
    }
  }
}
</script>
